<template>
    <div class="boxShadow stationSetComponent">
        <el-form ref="ruleForm" :model="stationForm" class="wifiForm">
            <p class="boldTitle">编辑轨迹</p>
            <el-form-item class="">
                <div class="flex formItem">
                    <div class="itemLeft">轨迹名称</div>
                    <div class="itemRight"><input type="text" placeholder="请输入站点名称" v-model="stationForm.name"></div>
                </div>
            </el-form-item>

            <el-form-item>
                <div class="flex formItem">
                    <div class="itemLeft">选择站点</div>
                    <div class="itemRight">
                        <el-select v-model="stationForm.value" placeholder="请选择站点" size="mini" class="stationType">
                            <el-option
                            v-for="item in stationForm.options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </div>
                </div>
            </el-form-item>

            <div class="flex formBtns">
                <el-button size="small" type="primary" @click="subUpdate('stationForm')">提交</el-button>
            </div>
        </el-form>
    </div>    
</template>

<script>
export default {
    name: 'trackSetting',
    components:{

    },
    data(){
        return{
            stationForm:{
                name:'',
                options: [{
                    value: '选项1',
                    label: '黄金糕'
                }, {
                    value: '选项2',
                    label: '双皮奶'
                }, {
                    value: '选项3',
                    label: '蚵仔煎'
                }, {
                    value: '选项4',
                    label: '龙须面'
                }, {
                    value: '选项5',
                    label: '北京烤鸭'
                }],
                value: '',
            },
            
        }
    },
    methods:{
        //提交
        subUpdate(formName) {
            
        console.log(this.stationForm)
      },
      //重置
      resetForm(formName) {
        this.$refs[formName].resetFields();
      }
    },

    //属性监听
    watch:{
       
    }

}
</script>

<style scoped lang="less">
 .stationSetComponent{
     position: fixed;
     bottom: 0;
     left: 60px;
     width: calc(100% - 120px);
     background-color: #ffffff;
     border-top-left-radius: 4px;
     border-top-right-radius: 4px;
     padding: 10px;
     text-align: left;
     font-size: 14px;
 }
 .boldTitle{
     font-weight: bold;
     margin-bottom: 7.5px;
 }
 .formItem{
    padding: 10px 0;
     border-bottom: 1px solid #eeeeee;
    .itemLeft{
        flex: 4
    }
    .itemRight{
        flex: 6;
        input{
            width: 100%;
            height: 100%;
            display: block;            
        }
    }
 }
 .stationType{
     input{
         height: 10px;
     }
     .el-input__icon{
         height:inherit
     }
     .el-input__inner{
         height: normal;
         line-height: normal
     }
    width: 100%;
        //清除select的边框样式
    border: none;
    //清除select聚焦时候的边框颜色
    outline: none;
    padding-left: 0.7em;
    // option::-ms-expand{ display: none; }
}
 .formBtns{
     padding: 0 5px;
     margin-top: 15px;
     button{
         width: 100%;
     }
 }
 .el-form-item{
     margin-bottom: 0;
 }
 .wifiForm div{
    line-height:normal;
 }
 
  .el-form-item__content{
        line-height: 20px;
    }
</style>